package com.crazy.mybatis.gerenator;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.crazy.mybatis.gerenator.service.Generator;
import com.crazy.mybatis.gerenator.service.util.ApplicationContextHolder;

@SpringBootApplication
public class GeneratorApplication implements CommandLineRunner {
	
	public static void main(String[] args) {
		SpringApplication.run(GeneratorApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		
		ApplicationContextHolder.getApplicationContext().getBean(Generator.class).generate();;
	}

}
